import Home from '@/views/Home'
import DocFooter from '@/components/DocFooter'
const Mine = () => import('@/views/Mine')
const News = () => import('@/views/News')
const Type = () => import('@/views/Type')
const Login = () => import('@/views/Login')
const Register = () => import('@/views/Register')

const routes = [
  {
    path: '/',
    redirect: '/home',
    meta: {
      isTabbar: false
    }
  },
  {
    path: '/home',
    name: 'Home',
    components: {
      default: Home,
      'doc-footer': DocFooter
    },
    meta: {
      isTabbar: true,
      title: '首页',
      icon: 'home-o'
    }
  },
  {
    path: '/type',
    name: 'Type',
    components: {
      default: Type,
      'doc-footer': DocFooter
    },
    meta: {
      isTabbar: true,
      title: '分类',
      icon: 'label-o'
    }
  },
  {
    path: '/news',
    name: 'News',
    components: {
      default: News,
      'doc-footer': DocFooter
    },
    meta: {
      isTabbar: true,
      title: '消息',
      icon: 'chat-o'
    }
  },
  {
    path: '/mine',
    name: 'Mine',
    components: {
      default: Mine,
      'doc-footer': DocFooter
    },
    meta: {
      isTabbar: true,
      title: '我的',
      icon: 'friends-o'
    }
  },
  {
    path: '/login',
    name: 'Login',
    components: {
      default: Login
    },
    meta: {
      isTabbar: false
    }
  },
  {
    path: '/register',
    name: 'Register',
    components: {
      default: Register
    },
    meta: {
      isTabbar: false
    }
  }
]

export default routes
